import request from '@/utils/request'

// 查询用车订单分配记录列表
export function listHis (query) {
  return request({
    url: '/order/his/list',
    method: 'get',
    params: query
  })
}

// 查询用车订单分配记录详细
export function getHis (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/order/his/getInfo',
    method: 'get',
    params: params
  })
}

// 新增用车订单分配记录
export function addHis (data) {
  return request({
    url: '/order/his/insert',
    method: 'post',
    data: data
  })
}

// 修改用车订单分配记录
export function updateHis (data) {
  return request({
    url: '/order/his/update',
    method: 'post',
    data: data
  })
}

// 删除用车订单分配记录
export function delHis (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/order/his/delete',
    method: 'post',
    params: params
  })
}
// 批量删除用车订单分配记录
export function delBatchHis (ids) {
  const params = {
    'ids': ids
  }
  return request({
    url: '/order/his/deleteBatch',
    method: 'post',
    params: params
  })
}

// 导入用车订单分配记录
export function importData (data) {
  return request({
    url: '/order/his/importData',
    method: 'post',
    data: data
  })
}
